The present invention relates to an arithmetic circuit for performing arithmetic, logical, and other general operations and, more particularly, to a stack-type arithmetic circuit for performing operations by using a stack.
A conventional stack-type arithmetic circuit of this type pops necessary data from a stack to perform an operation, and pushes back an operation result to the stack. That is, data to be operated is stored in only the stack. An up/down counter is used as a stack pointer for accessing the stack.
The operation speed of the above conventional stack-type arithmetic circuit, however, is lower than that of an arithmetic circuit (to be referred to as a register-type arithmetic circuit hereinafter) which holds data to be operated in a register and stores an operation result in the register In addition, this register-type arithmetic circuit can execute an instruction in one cycle, while the stack-type arithmetic circuit cannot execute an instruction in one cycle since the stack must be accessed Furthermore, since the structure of an up/down pointer used as a stack pointer is complicated, switching between counting directions requires a long time.